package com.server.libs.ret;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class R<T> {
    //是否成功
    private Boolean success;
    //状态码
    private Integer code;
    //提示信息
    private String msg;
    //数据
    private T data;

    String authorization;

    public R(String msg) {
        this.msg = msg;
        this.success = true;
        this.code = 200;
    }

    public R(String msg, Boolean success) {
        this.msg = msg;
        this.success = success;
        this.code = 200;
    }

    public R(String msg, Integer code, Boolean success) {
        this.msg = msg;
        this.success = success;
        this.code = code;
    }


}
